#include <glib.h>

gint main(gint argc, gchar **argv)
{
    GBytes *bytes = NULL;
    gsize size = 0;
    gconstpointer mem = NULL;

    bytes = g_bytes_new("abc", 3);

    size = g_bytes_get_size(bytes);

    mem = g_bytes_get_data(bytes, NULL);

    g_print("mem(len:%d):%s \n", (gint)size, (gchar *)mem);

    g_bytes_unref(bytes);

    return 0;
}